#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	string s;
	getline(cin, s);

	string m = "love";
	unordered_map<char, int> cnt;

	for (auto &i : s) {
		i = tolower(i);
		if (m.find(i) != -1)
			cnt[i]++;
	}

	int ans = 1001;
	for (auto i : cnt) {
		ans = min(ans, i.second);
	}
	cout << ((ans == 1001 || cnt.size() != 4) ? "表白失败" : to_string(ans));
	return 0;
}
